package com.apigateway.util;

import java.util.List;
import java.util.Random;

/**
 * Created by 小泽玛丽罗 on 2017/3/1.
 */
public class MathRandom {
    public static int random(List list){
        if(list==null||list.size()==0)
            return -1;
        Random random=new Random();
        int index=random.nextInt(list.size());
        return index;
    }
}
